package com.hoshiicloud.purchase.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.purchase.feign.hystrix.HystrixUserFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "hoshiicloud-user", fallback = HystrixUserFeignFallback.class)
@Repository
public interface UserService {

    @GetMapping(value = "/organization/com-organization/{id}")
    Response getComOrganizationById(@PathVariable("id") Long id);

    @GetMapping(value = "/organization/plat-organization/{id}")
    Response getPlatOrganizationById(@PathVariable("id") Long id);

    @GetMapping(value = "/organization/store-organization/{id}")
    Response getStoreOrganizationById(@PathVariable("id") Long id);

    @GetMapping(value = "/company/company/{id}")
    Response getCompanyById(@PathVariable("id") Long id);

    @GetMapping(value = "/platform/platform/{id}")
    Response getPlatformById(@PathVariable("id") Long id);

    @GetMapping(value = "/store/plat-store/{id}")
    Response getPlatStoreById(@PathVariable("id") Long id);


}
